﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace XtremBiking.Web.Models.Usuarios
{
    public class PersonalInfo
    {
        [HiddenInput(DisplayValue = false)]
        public long IdUsuario { get; set; }

        [Display(Name = "DisplayAddress", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "AddressRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [StringLength(250, ErrorMessageResourceName = "AddressMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
        public string Direccion { get; set; }

        [Display(Name = "DisplayPhone", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "PhoneRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [StringLength(20, ErrorMessageResourceName = "PhoneMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        public string Telefono { get; set; }

        [Display(Name = "DisplayCellPhone", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "CellPhoneRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [StringLength(20, ErrorMessageResourceName = "CellPhoneMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        public string Celular { get; set; }

        [Display(Name = "DisplayDocument", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "DocumentRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [StringLength(20, ErrorMessageResourceName = "DocumentMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        public string Documento { get; set; }

        [Display(Name = "DisplayBirthDate", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "BirthDateRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [DataType(System.ComponentModel.DataAnnotations.DataType.Date)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime FechaNacimiento { get; set; }

        [Display(Name = "DisplayHeight", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "HeightRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[DataType(System.ComponentModel.DataAnnotations.DataType.Currency)]
        //[StringLength(4, ErrorMessageResourceName = "HeightMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[Range(0.01, 3.00, ErrorMessageResourceName = "HeightMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[DisplayFormat(ApplyFormatInEditMode = false, DataFormatString = "{0:0.00")]
        //[DisplayFormat(DataFormatString = "{0:F2}", ApplyFormatInEditMode = true)]
        [Range(typeof(float), "0", "3")]
        [DataType(System.ComponentModel.DataAnnotations.DataType.Currency)]
        public float Altura { get; set; }

        [Display(Name = "DisplayWeight", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = false, ErrorMessageResourceName = "WeightRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[DataType(System.ComponentModel.DataAnnotations.DataType.Currency)]
        //[StringLength(6, ErrorMessageResourceName = "WeightMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[Range (0.01, 300.000, ErrorMessageResourceName = "WeightMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[DisplayFormat(ApplyFormatInEditMode = false, DataFormatString = "{0:0.000")]
        [Range(typeof(float),"0","300")]
        [DataType(System.ComponentModel.DataAnnotations.DataType.Currency)]
        public float Peso { get; set; }

        [Display(Name = "DisplayCompetitions", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = true, ErrorMessageResourceName = "CompetitionsRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
        public string Competencias { get; set; }

        [Display(Name = "DisplayKilometers", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = true, ErrorMessageResourceName = "KilometersRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[StringLength(6, ErrorMessageResourceName = "KilometersMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Range(0, 99999, ErrorMessageResourceName = "KilometersMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        public int KmsRecorridos { get; set; }

        [Display(Name = "DisplayWhyCicling", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = true, ErrorMessageResourceName = "WhyCiclingRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
        public string PorQueCiclismo { get; set; }

        [Display(Name = "DisplayMaxPulse", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = true, ErrorMessageResourceName = "MaxPulseRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[StringLength(3, ErrorMessageResourceName = "MaxPulseMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Range(0, 300, ErrorMessageResourceName = "MaxPulseMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        public int PulsoMaximo { get; set; }

        [Display(Name = "DisplayBasalPulse", ResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Required(AllowEmptyStrings = true, ErrorMessageResourceName = "BasalPulseRequired", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        //[StringLength(3, ErrorMessageResourceName = "BasalPulseMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        [Range(0, 300, ErrorMessageResourceName = "BasalPulseMaxChars", ErrorMessageResourceType = typeof(Recursos.Modelos.Usuarios.PersonalInfo))]
        public int PulsoBasal { get; set; }
    }
}